Remove leaf_customer_span_id baggage re-parenting hack from tracing#46085
Open
Remove leaf_customer_span_id baggage re-parenting hack from tracing#46085
Conversation
- added type spec model generation - add model validator generation - creating a server
* trying * generate contract models * add validator generator * fix model generation * add more unit tests * fix conflict * refined model generation
* trying * generate contract models * add validator generator * fix model generation * add more unit tests * fix conflict * refined model generation * renamed the pacakge
* create response * cancel and delete * fix options
Per updated container spec, agentservice expects /readiness. Updated route, method name, docstrings, README, samples, and all tests across -core, -invocations, and -responses. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The latest opentelemetry-sdk added _on_ending to the SpanProcessor interface, causing AttributeError at runtime. Add the required no-op method to fix compatibility. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…_id resolution and stamping) Agent-Logs-Url: https://github.com/Azure/azure-sdk-for-python/sessions/40114cbe-e583-4912-abc7-75c551a7e12c Co-authored-by: ankitbko <3169316+ankitbko@users.noreply.github.com>
…ID Resolution) Agent-Logs-Url: https://github.com/Azure/azure-sdk-for-python/sessions/40114cbe-e583-4912-abc7-75c551a7e12c Co-authored-by: ankitbko <3169316+ankitbko@users.noreply.github.com>
… private imports, simplify model access in samples Agent-Logs-Url: https://github.com/Azure/azure-sdk-for-python/sessions/40114cbe-e583-4912-abc7-75c551a7e12c Co-authored-by: ankitbko <3169316+ankitbko@users.noreply.github.com>
…n hint priority, add invalid header test Agent-Logs-Url: https://github.com/Azure/azure-sdk-for-python/sessions/40114cbe-e583-4912-abc7-75c551a7e12c Co-authored-by: ankitbko <3169316+ankitbko@users.noreply.github.com>
* update otel * refined readme * updated model validator * fix model
…cing dupe protection Thread 17: Replace ErrorResponse.create() with create_error_response() and AgentLogger.get() with get_logger() module-level functions. Updated all call sites across core, invocations, and responses packages. Thread 18: Added Breaking Changes section to CHANGELOG.md documenting the API renames, removed constants, and health endpoint rename. Thread 21: Added module-level sentinel flags to _setup_trace_export, _setup_log_export, _setup_otlp_trace_export, and _setup_otlp_log_export to prevent duplicate exporters across multiple TracingHelper instantiations. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…ider Migrated FoundryStorageProvider from raw httpx.AsyncClient to azure.core.AsyncPipelineClient, gaining built-in retry, logging, distributed tracing, and bearer-token authentication via AsyncBearerTokenCredentialPolicy. - Removed manual _auth_headers() — handled by pipeline policy - Removed http_client constructor parameter — pipeline is internal - Updated _foundry_errors.py to use azure.core.rest.HttpResponse - Removed httpx from pyproject.toml dependencies - Updated all unit tests to mock send_request instead of httpx methods Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
CreateResponse always has a model attribute, so the defensive getattr is unnecessary boilerplate. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Responses package has been split into a separate PR on the agentserver/responses branch for independent review and iteration. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…langgraph from main These packages were inadvertently removed in an earlier commit. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…ly (#46069) Add set_current_span/detach_context to TracingHelper so the invoke_agent span is attached as the active OTel context span. This ensures child spans created by framework handlers are parented under invoke_agent instead of appearing as siblings. - TracingHelper.set_current_span() attaches the span to context - TracingHelper.detach_context() restores the previous context - InvocationHandler propagates span_token through both streaming and non-streaming cleanup paths - Added test_span_parenting.py to verify parent-child relationship Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Use standard OTel traceparent propagation instead of overriding the parent span ID via the baggage header's leaf_customer_span_id key. - Remove _parse_baggage_key() and _override_parent_span_id() helpers - Remove baggage_header parameter from span/start_span/_extract_context - Simplify _prepare_request_span_args to return 3-tuple (no baggage) - Remove associated tests (TestParseBaggageKey, test_baggage_leaf_customer_span_id) - Preserve set_baggage/detach_baggage OTel context API (unrelated) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Use standard OTel traceparent propagation instead of overriding the parent span ID via the baggage header's leaf_customer_span_id key.
Description
Please add an informative description that covers that changes made by the pull request and link all relevant issues.
If an SDK is being regenerated based on a new API spec, a link to the pull request containing these API spec changes should be included above.
All SDK Contribution checklist:
General Guidelines and Best Practices
Testing Guidelines